import java.util.Scanner;
public class Lab06_Task03 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int sum = 0;
        String c = "";
        do {
            int i = s.nextInt();
            int j = s.nextInt();
            sum = sum+i+j;
            c = s.next();
        } while (c.toLowerCase().equals("yes"));
        System.out.println("Sum = "+sum);
    }
}